/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       adv_artifact.h

	$Header: /game/adv_artifact.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef ADV_ARTIFACT_H_INCLUDED
#define ADV_ARTIFACT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "artifact.h"
#include "stationary_adventure_object.h"

enum t_spell;

// -------------------------------------------------------
// artifact as it appears on the adventure map
// -------------------------------------------------------
class t_adv_artifact : public t_stationary_adventure_object
{
public:
	t_adv_artifact(  std::string const& source, t_qualified_adv_object_type const& type );
	t_adv_artifact( t_artifact_type type );
	virtual void			activate_trigger( t_army* army, t_adv_map_point const& point, 
		                                   t_direction direction, t_adventure_frame* frame );
	virtual float			ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;	
	t_artifact const&		get_artifact() const;
	virtual std::string		get_name() const;
	virtual bool			preplacement( t_adventure_map& map, int pass );
	virtual bool			read( std::streambuf&						stream, 
								   t_qualified_adv_object_type const&	type,
								   int									version );
	virtual void			right_click( t_mouse_event const& event,
		                                  t_adventure_frame* adventure_frame );
	virtual bool			write( std::streambuf& stream ) const;
protected:
	t_artifact m_artifact;
};

inline t_artifact const& t_adv_artifact::get_artifact() const
{
	return m_artifact;
}


// -------------------------------------------------------
// scrolls & parchments on the adventure map
// -------------------------------------------------------
class t_adv_spell_artifact : public t_adv_artifact
{
public:
	t_adv_spell_artifact(  std::string const& source, t_qualified_adv_object_type const& type );
	t_adv_spell_artifact( t_artifact_type type, t_spell spell );

	virtual bool		read_from_map( std::streambuf & stream,
										t_progress_handler* );
};

// -------------------------------------------------------
// random artifact as it appears on the adventure map
// -------------------------------------------------------
class t_random_artifact : public t_stationary_adventure_object
{
public:
	t_random_artifact( std::string const& model_name );

	virtual void		place( t_adventure_map &		map,
							   t_adv_map_point const&	point );
};

// -------------------------------------------------------
// random tome
// -------------------------------------------------------
class t_random_tome : public t_stationary_adventure_object
{
public:
	t_random_tome( std::string const& source );

	virtual void		place( t_adventure_map &		map,
							   t_adv_map_point const&	point );
};

// -------------------------------------------------------
// random staff
// -------------------------------------------------------
class t_random_staff : public t_stationary_adventure_object
{
public:
	t_random_staff( std::string const& source );

	virtual void		place( t_adventure_map &		map,
							   t_adv_map_point const&	point );
};

// -------------------------------------------------------
// random potion
// -------------------------------------------------------
class t_random_potion : public t_stationary_adventure_object
{
public:
	t_random_potion( std::string const& source );

	virtual void		place( t_adventure_map &		map,
							   t_adv_map_point const&	point );
};




#endif // ADV_ARTIFACT_H_INCLUDED